package com.atguigu.gmall.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author: atguigu
 * @create: 2023-09-12 14:08
 */
@Controller
public class LoginHtmlController {


    /**
     * 渲染登录页面
     *
     * @param model
     * @param originUrl
     * @return
     */
    @GetMapping("/login.html")
    public String loginHtml(Model model, @RequestParam(required = false) String originUrl) {
        model.addAttribute("originUrl", originUrl);
        return "/login";
    }
}
